<!DOCTYPE html>
<html>
<head lang="en">
<head lang="zh-CN">
    <link rel="stylesheet" href="../css/bootstrap.css">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" charset="UTF-8">
    <title></title>
</head>
</head>
<body>

<div class="container-fluid">

    <!-- Button trigger modal -->
    <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
        Launch demo modal
    </button>

    <button type="button" class="btn btn-default btn-lg" id="clickModal">
        clickme
    </button>

    <div class="row">

        <div class="col-md-8"></div>
        <div class="col-md-4">
            <!-- Modal -->
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel">Modal title</h4>
                        </div>
                        <div class="modal-body">
                            ...
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                            <button type="button" class="btn btn-primary">Save changes</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-5"></div>
    </div>

</div>

<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/bootstrap.js"></script>
<script>

    $(function(){
        var value = "我是魔天狂";
        my(value);

    });

    function my(value){
        $('#clickModal').on("click",function(){
            console.log(value)
            $(".modal-body").html(value);

            $("#myModal").modal('show');
        });
    }

</script>
</body>
</html>